package com.x.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * ClassName: MvcCongif
 * Package: IntelliJ IDEA
 * Description:
 * Written by HanXu
 * Create 2024.09.10 21:07
 */

/**
 * 1、controller配置ioc容器
 * 2、handlerMapping handlerAdapter加入ioc容器
 */
@Configuration
@ComponentScan("com.x.controller")
public class MvcConfig {

    //秘书
    @Bean
    public RequestMappingHandlerMapping handlerMapping(){
        return new RequestMappingHandlerMapping();
    }

    //经理
    @Bean
    public RequestMappingHandlerAdapter handlerAdapter(){
        return new RequestMappingHandlerAdapter();
    }
}
